$OpenBSD: patch-Source_WTF_wtf_RAMSize_cpp,v 1.2 2014/03/25 06:25:45 landry Exp $
--- Source/WTF/wtf/RAMSize.cpp.orig	Tue Jan 21 15:06:51 2014
+++ Source/WTF/wtf/RAMSize.cpp	Fri Feb 14 20:41:39 2014
@@ -27,7 +27,7 @@
 #include "RAMSize.h"
 
 #include "StdLibExtras.h"
-#if OS(DARWIN)
+#if OS(DARWIN) || OS(OPENBSD)
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/sysctl.h>
@@ -43,13 +43,17 @@ static const size_t ramSizeGuess = 128 * MB;
 
 static size_t computeRAMSize()
 {
-#if OS(DARWIN)
+#if OS(DARWIN) || OS(OPENBSD)
     int mib[2];
     uint64_t ramSize;
     size_t length;
 
     mib[0] = CTL_HW;
+#if OS(DARWIN)
     mib[1] = HW_MEMSIZE;
+#else
+    mib[1] = HW_PHYSMEM64;
+#endif
     length = sizeof(int64_t);
     int sysctlResult = sysctl(mib, 2, &ramSize, &length, 0, 0);
     if (sysctlResult == -1)
